home *** CD-ROM | disk | FTP | other *** search
/ Programming Languages Suite / ProgramD2.iso / Borland / Borland C++ V5.02 / SCRIB6.PAK / SCRIBVW.H < prev    next >
C/C++ Source or Header  |  1997-05-06  |  2KB  |  74 lines

  1. // ScribVw.h : interface of the CScribbleView class
  2. //
  3. // This is a part of the Microsoft Foundation Classes C++ library.
  4. // Copyright (C) 1992-1995 Microsoft Corporation
  5. // All rights reserved.
  6. //
  7. // This source code is only intended as a supplement to the
  8. // Microsoft Foundation Classes Reference and related
  9. // electronic documentation provided with the library.
  10. // See these sources for detailed information regarding the
  11. // Microsoft Foundation Classes product.
  12. /////////////////////////////////////////////////////////////////////////////
  13.  
  14. class CScribbleView : public CScrollView
  15. {
  16. protected: // create from serialization only
  17.     CScribbleView();
  18.     DECLARE_DYNCREATE(CScribbleView)
  19.  
  20. // Attributes
  21. public:
  22.     CScribbleDoc* GetDocument();
  23.  
  24. protected:
  25.     CStroke*    m_pStrokeCur;   // the stroke in progress
  26.     CPoint      m_ptPrev;       // the last mouse pt in the stroke in progress
  27.  
  28. // Operations
  29. public:
  30.  
  31. // Overrides
  32.     // ClassWizard generated virtual function overrides
  33.     //{{AFX_VIRTUAL(CScribbleView)
  34.     public:
  35.     virtual void OnDraw(CDC* pDC);  // overridden to draw this view
  36.     virtual BOOL PreCreateWindow(CREATESTRUCT& cs);
  37.     virtual void OnInitialUpdate();
  38.     protected:
  39.     virtual BOOL OnPreparePrinting(CPrintInfo* pInfo);
  40.     virtual void OnBeginPrinting(CDC* pDC, CPrintInfo* pInfo);
  41.     virtual void OnEndPrinting(CDC* pDC, CPrintInfo* pInfo);
  42.     virtual void OnUpdate(CView* pSender, LPARAM lHint, CObject* pHint);
  43.     virtual void OnPrint(CDC* pDC, CPrintInfo* pInfo);
  44.     //}}AFX_VIRTUAL
  45.  
  46. // Implementation
  47. public:
  48.     void PrintTitlePage(CDC* pDC, CPrintInfo* pInfo);
  49.     void PrintPageHeader(CDC* pDC, CPrintInfo* pInfo, CString& strHeader);
  50.     virtual ~CScribbleView();
  51. #ifdef _DEBUG
  52.     virtual void AssertValid() const;
  53.     virtual void Dump(CDumpContext& dc) const;
  54. #endif
  55.  
  56. protected:
  57.  
  58. // Generated message map functions
  59. protected:
  60.     //{{AFX_MSG(CScribbleView)
  61.     afx_msg void OnLButtonDown(UINT nFlags, CPoint point);
  62.     afx_msg void OnLButtonUp(UINT nFlags, CPoint point);
  63.     afx_msg void OnMouseMove(UINT nFlags, CPoint point);
  64.     //}}AFX_MSG
  65.     DECLARE_MESSAGE_MAP()
  66. };
  67.  
  68. #ifndef _DEBUG  // debug version in ScribVw.cpp
  69. inline CScribbleDoc* CScribbleView::GetDocument()
  70.    { return (CScribbleDoc*)m_pDocument; }
  71. #endif
  72.  
  73. /////////////////////////////////////////////////////////////////////////////
  74.